package com.qst.express.controller;


import com.qst.commonUtils.result.R;
import com.qst.express.service.ExpressService;
import com.qst.express.service.SumService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author mjh
 * @since 2022-10-25
 */
@Api(description = "本地快递统计")
@RestController
@RequestMapping("/e/express")
@CrossOrigin
public class SumController {
    @Autowired
    SumService sumService;
    @ApiOperation(value = "本地快递数量")
    @GetMapping("/exressSum")
    public R exressSum() {
        List<Map<String, Integer>> data = sumService.exressSum();
        return R.ok().data("exressSum", data);
    }
}

